<form id="pagerForm" method="post" action="">
	<input type="hidden" name="pageNum" value="{$pageNum}" />
	<input type="hidden" name="numPerPage" value="{$numPerPage}" />
	<input type="hidden" name="orderField" value="{$orderField}" />
	<input type="hidden" name="orderDirection" value="{$orderDirection}" />
	<input type="hidden" name="keywords" value="{$keywords}" />
	<input type="hidden" name="sfield" value="{$sfield}" />
	<input type="hidden" name="platform" value="{$platform}" />
</form>

<div class="pageHeader">
	<form rel="pagerForm" onsubmit="return navTabSearch(this);" action="" method="post">
		<input type="hidden" name="m" value="{$module_name}" />
		<input type="hidden" name="a" value="{$action_name}" />
	<div class="searchBar">
		<ul class="searchContent">
			<li style="width:210px;">
				<label style="width:60px;">关键字：</label>
				<input type="text" name="keywords" value="{$keywords}" style="width:120px;"/>
			</li>
			<li style="width:60px;">
			<select name="sfield" class="combox">
				<option value="all" {if $sfield=='all'}selected="selected"{/if}>全部</option>
				<option value="userid" {if $sfield=="userid"}selected="selected"{/if}>订单会员ID</option>
				<option value="sn" {if $sfield=="sn"}selected="selected"{/if}>订单编号</option>
				<option value="id" {if $sfield=="id"}selected="selected"{/if}>ID</option>
			</select>
			<input type="hidden" name="sfield_name" value="id,userid,sn" />
			</li>
            <li style="width:380px;">
                <label style="width:60px;">订单区域：</label>
                <select name="province"   ref="city_kitorder" refUrl="{:U('Kit/area')}&id={value}&level=2" class="combox">
                    <option value="all">请选择省份...</option>
                    <volist name="Area_list" id="vo">
                        {if $vo['parentid'] == 0}
                        <option value="{$vo['id']}" {if $province==$vo['id']}selected="selected"{/if}>{$vo['name']}</option>
                        {/if}
                    </volist>
                  </select>
                  <select name="city" ref="area_kitorder" refUrl="{:U('Kit/area')}&id={value}&level=3" id="city_kitorder" class="combox">
                    <option value="all">请选择城市...</option>
                    {if !empty($city)}
                    <volist name="Area_list" id="vo">
                        {if $vo['parentid'] == $province}
                        <option value="{$vo['id']}" {if $city==$vo['id']}selected="selected"{/if}>{$vo['name']}</option>
                        {/if}
                    </volist>
                    {/if}
                  </select>
                  <select name="area" id="area_kitorder" class="combox">
                    <option value="all">请选择区域...</option>
                    {if !empty($area)}
                    <volist name="Area_list" id="vo">
                        {if $vo['parentid'] == $city}
                        <option value="{$vo['id']}" {if $area==$vo['id']}selected="selected"{/if}>{$vo['name']}</option>
                        {/if}
                    </volist>
                    {/if}
                  </select>
            </li>
            <li style="width:420px;">
                <label style="width:60px;">订单状态：</label>
                <select name="status" class="combox">
                    <option value="all" {if $status=='all'||empty($status)}selected="selected"{/if}>请选择...</option>
                    <volist name="order_status" id="vo" key="k">
                        {if ($k-1) == 0}
                            <option value="-1" {if $status=='-1'}selected="selected"{/if}>{$vo}</option>
                        {else}
                            <option value="{$k-1}" {if $status==$k-1}selected="selected"{/if}>{$vo}</option>
                        {/if}
                    </volist>
                </select>
                <select name="pay_status" class="combox">
                    <option value="all" {if $pay_status=='all'||empty($pay_status)}selected="selected"{/if}>请选择...</option>
                    <option value="-1" {if $pay_status=='-1'}selected="selected"{/if}>未支付</option>
                    <option value="1" {if $pay_status=='1'}selected="selected"{/if}>已支付</option>
                </select>
                <select name="shipping_status" class="combox">
                    <option value="all" {if $shipping_status=='all'||empty($shipping_status)}selected="selected"{/if}>请选择...</option>
                    <option value="-1" {if $shipping_status=='-1'}selected="selected"{/if}>未出货</option>
                    <option value="1" {if $shipping_status=='1'}selected="selected"{/if}>已出货</option>
                </select>
                <select name="checkout_status" class="combox">
                    <option value="all" {if $checkout_status=='all'||empty($checkout_status)}selected="selected"{/if}>请选择...</option>
                    <option value="-1" {if $checkout_status=='-1'}selected="selected"{/if}>未结算</option>
                    <option value="1" {if $checkout_status=='1'}selected="selected"{/if}>已结算</option>
                </select>
            </li>
			<div class="buttonActive"><div class="buttonContent"><button type="submit">检索</button></div></div>
		</ul>
	</div>
	</form>
</div>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<li><a class="icon" width="830" height="380" href="{:U('Kitorder/detail')}&id={sid_dv}" target="dialog" warn="请选择一条信息"><span>查看订单</span></a></li>
			<!--<li><a class="icon" href="javascript:$.printBox('user_list')"><span>打印</span></a></li>-->
		</ul>
	</div>
	<div id="user_list">
	<table class="table" layoutH="110">
		<thead>
			<tr>
				<th width="30"><input type="checkbox" group="ids[]" class="checkboxCtrl"></th>
				<th width="50" orderField="id" {if $orderField=='id'}class="{$orderDirection}"{/if}>ID</th>
				<th width="150" orderField="sn" {if $orderField=='sn'}class="{$orderDirection}"{/if}>订单编号</th>
				<th width="50" orderField="userid" {if $orderField=='userid'}class="{$orderDirection}"{/if}>用户ID</th>
				<th width="60" orderField="province" {if $orderField=='province'}class="{$orderDirection}"{/if}>省份</th>
				<th width="60" orderField="city" {if $orderField=='city'}class="{$orderDirection}"{/if}>城市</th>
				<th width="60" orderField="area" {if $orderField=='area'}class="{$orderDirection}"{/if}>区域</th>
				<th width="60" orderField="city" {if $orderField=='city'}class="{$orderDirection}"{/if}>金额</th>
				<th width="50" orderField="area" {if $orderField=='area'}class="{$orderDirection}"{/if}>总量</th>
				<th width="150" orderField="add_time" {if $orderField=='add_time'}class="{$orderDirection}"{/if}>下单时间</th>								
				<th width="100" orderField="status" {if $orderField=='status'}class="{$orderDirection}"{/if}>订单状态</th>
				<th width="60" orderField="pay_time" {if $orderField=='pay_time'}class="{$orderDirection}"{/if}>支付状态</th>
				<th width="60" orderField="shipping_time" {if $orderField=='shipping_time'}class="{$orderDirection}"{/if}>出货状态</th>
				<th width="60" orderField="checkout_time" {if $orderField=='checkout_time'}class="{$orderDirection}"{/if}>结算状态</th>
				<th width="120">操作</th>
			</tr>
		</thead>
		<tbody>
<volist name="list" id="vo">
			<tr target="sid_dv" rel="{$vo['id']}">
				<td><input name="ids[]" value="{$vo['id']}" type="checkbox"></td>
				<td>{$vo['id']}</td>
				<td>{$vo['sn']}</td>
				<td><a title="查看" target="dialog" style="color:blue;" width="630" height="590" rel="User_detail_{$vo['id']}" href="{:U('User/detail',array('id'=>$vo['userid']))}">{$vo['userid']}</a></td>
				<td>{$Area_list[$vo[province]]['name']}</td>
                <td>{$Area_list[$vo[city]]['name']}</td>
                <td>{$Area_list[$vo[area]]['name']}</td>
				<td>{$vo[amount]/100}</td>
				<td>{$vo[count_num]}</td>
				<td>{$vo["add_time"] ? $vo["add_time"]|date='Y-m-d H:m:s',###:""}</td>
				<td>{$order_status[$vo[status]]}</td>
                <td><a title="{$vo["pay_time"] ? $vo["pay_time"]|date='Y-m-d H:m:s',###:""}">{$order_pay[$vo[pay_status]]}</a></td>
                <td><a title="{$vo["shipping_time"] ? $vo["shipping_time"]|date='Y-m-d H:m:s',###:""}">{$order_shipping[$vo[shipping_status]]}</a></td>
                <td><a title="{$vo["checkout_time"] ? $vo["checkout_time"]|date='Y-m-d H:m:s',###:""}">{$order_checkout[$vo[checkout_status]]}</a></td>
				<td><a title="出货并结算" target="ajaxTodo" width="580" height="350"  rel="Kitorder_accept_{$vo['id']}" href="{:U('Kitorder/accept',array('id'=>$vo[id],'province'=>$vo[province],'city'=>$vo[city],'area'=>$vo[area],'order_time'=>$vo[add_time],'order_user'=>$vo[userid]))}" class="btnEdit">处理</a><a title="查看" target="dialog" width="830" height="380" rel="Kitorder_detail_{$vo['id']}" href="{:U('Kitorder/detail',array('id'=>$vo['id']))}" class="btnInfo">查看</a></td>
			</tr>
</volist>
		</tbody>
	</table>
	</div>
	<div class="panelBar">
		<div class="pages">
			<span>显示</span>
			<select class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
				<option value="20" {if $numPerPage==20}selected="selected"{/if}>20</option>
				<option value="50" {if $numPerPage==50}selected="selected"{/if}>50</option>
				<option value="66" {if $numPerPage==66}selected="selected"{/if}>66</option>
				<option value="100" {if $numPerPage==100}selected="selected"{/if}>100</option>
				<option value="200" {if $numPerPage==200}selected="selected"{/if}>200</option>
			</select>
			<span>条，共{$totalCount}条</span>
		</div>
		
		<div class="pagination" targetType="navTab" totalCount="{$totalCount}" numPerPage="{$numPerPage}" pageNumShown="10" currentPage="{$pageNum}"></div>
	</div>
</div>
